/*
 * @Descripttion: 
 * @Author: zhanyi
 * @Date: 2021-10-21 20:33:13
 * @FilePath: \wczd-mobile\src\api\task.js
 */
// 引入工具类
import request from '@/utils/request.js'

// 获取我的任务 
export function getMyTask (data) {
  return request({
    url: '/inspection/whInspectionTask/getMyTask',
    method: 'post',
    data: data
  })
}

//获取任务路径详情
export function getWhInspectionTask(params){
  return request({
    url: '/inspection/whInspectionTask/one',
    method: 'post',
    params: params
  })
}

//获取任务路径节点
export function getRoadNodeByTaskId(params){
  return request({
    url: '/inspection/whInspectionTask/getRoadNodeByTaskId',
    method: 'post',
    params: params
  })
}

//获取任务非路径节点
export function getRoadNodeOtherByTaskId(params){
  return request({
    url: '/inspection/whInspectionTask/getRoadNodeOtherByTaskId',
    method: 'post',
    params: params
  })
}

export function getInspectionDetailByUniqueCode(params){
  return request({
    url: '/inspection/whInspectionTask/getInspectionDetailByUniqueCode',
    method: 'post',
    params: params
  })
}

export function commitTaskNodeCheckInfo(data){
  return request({
    url: '/inspection/whInspectionTaskRes/commitTaskNodeCheckInfo',
    method: 'post',
    data
  })
}

// 查询公司风险点  列表
export function listRiskFactor(data) {
  return request({
    url: '/business/riskFactor/list',
    method: 'post',
    data
  })
}

// 查询公司风险点树形目录  详细
export function getRiskCatalog(params) {
  return request({
    url: '/business/riskCatalog/one',
    method: 'post',
    params
  })
}

// 隐患统计
export function statisticsTask (data) {
  return request({
    url: '/inspection/whInspectionTask/statisticsTask',
    method: 'post',
    data: data
  })
}
